# cmake needs this line
cmake_minimum_required(VERSION 3.1)

# Enable C++11
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)

# Define project name
project(testsuiye)

add_compile_options(-pthread)
add_compile_options(-Ofast)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
# Find OpenCV, you may need to set OpenCV_DIR variable
# to the absolute path to the directory containing OpenCVConfig.cmake file
# via the command line or GUI
# find_package(OpenCV 4.2 REQUIRED)
find_package(OpenCV 4.2 REQUIRED)
# find_package(OpenCV 3 REQUIRED)

# If the package has been found, several variables will
# be set, you can find the full list with descriptions
# in the OpenCVConfig.cmake file.
# Print some message showing some of them
message(STATUS "OpenCV library status:")
message(STATUS "    config: ${OpenCV_DIR}")
message(STATUS "    version: ${OpenCV_VERSION}")
message(STATUS "    libraries: ${OpenCV_LIBS}")
message(STATUS "    include path: ${OpenCV_INCLUDE_DIRS}")

link_libraries(${OpenCV_LIBS} gfortran )
# link_libraries(${OpenCV_LIBS}  )

set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} /home/licc/w/software/dlib-19.19/lib64/cmake)
find_package(dlib REQUIRED)

# Declare the executable target built from your sources
add_executable(facedetect ${CMAKE_CURRENT_SOURCE_DIR}/facedetect.cpp)
add_executable(dbt_face_detection ${CMAKE_CURRENT_SOURCE_DIR}/dbt_face_detection.cpp)
add_executable(dnnfacedetect ${CMAKE_CURRENT_SOURCE_DIR}/dnnfacedetect.cpp)

add_executable(dlib_faceDetect ${CMAKE_CURRENT_SOURCE_DIR}/dlib_faceDetect.cpp)
target_link_libraries(dlib_faceDetect dlib::dlib)

add_executable(face_landmark_detection_ex ${CMAKE_CURRENT_SOURCE_DIR}/face_landmark_detection_ex.cpp)
target_link_libraries(face_landmark_detection_ex dlib::dlib)


# Link your application with OpenCV libraries
target_link_libraries(facedetect  ${OpenCV_LIBS})
